<?php

namespace App\Providers;


use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;

class EventServiceProvider extends ServiceProvider
{
    /**
     * The event listener mappings for the application.
     *
     * @var array
     */
    protected $listen = [
        'App\Events\Event' => [
            'App\Listeners\EventListener',
        ],
        'Laravel\Passport\Events\AccessTokenCreated' => [
            'App\Listeners\RevokeOldTokens',
        ],
        'Laravel\Passport\Events\RefreshTokenCreated' => [
            'App\Listeners\PruneOldTokens',
        ],
        'App\Events\EventOrderGoodsInventoryCarryingDetail' => [
            'App\Listeners\EventListenerOrderGoodsInventoryCarryingDetail',
        ],
        'App\Events\EventConsignmentNote' => [
            'App\Listeners\EventListenerConsignmentNote',
        ],
        'App\Events\EventAutoOrderCancel' => [
            'App\Listeners\EventListenerAutoOrderCancel',
        ],
        'App\Events\EventCancelConsignmentNote' => [
            'App\Listeners\EventListenerCancelConsignmentNote',
        ],
    ];

    /**
     * 需要注册的订阅者类
     *
     * @var array
     */
    protected $subscribe = [
        /**
         * 订单事件订阅者
         * @author ^2_3^岑业宝
         */
        'App\Listeners\EventOrderSubscriber',
    ];

    /**
     * Register any events for your application.
     *
     * @return void
     */
    public function boot()
    {
        parent::boot();
        /*Event::listen('event.*', function ($eventName, array $data) {
            //
        });*/
    }
}
